#
# Be sure to run `pod lib lint ThorWebViewSDK.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
    s.name             = 'ThorWebViewSDK'
    s.version          = '0.1.4'
    s.summary          = 'ThorWebViewSDK for ios.'
    
    # This description is used to generate tags and improve search results.
    #   * Think: What does it do? Why did you write it? What is the focus?
    #   * Try to keep it short, snappy and to the point.
    #   * Write the description between the DESC delimiters below.
    #   * Finally, don't worry about the indent, CocoaPods strips it!
    
    s.description      = '索尔风控系统对外SDK for ios.'
    
    s.homepage         = 'https://gitee.com/lin_zi_ios/ThorWebViewSDK'
    # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
    s.license          = { :type => 'MIT', :file => 'LICENSE' }
    s.author           = { 'panfei mao' => '843158788@qq.com' }
    s.source           = { :git => 'https://gitee.com/lin_zi_ios/ThorWebViewSDK.git', :tag => s.version.to_s }
    # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
    
    s.ios.deployment_target = '8.0'
    
    s.public_header_files = 'ThorWebViewSDK/ThorFramework.h'
    s.source_files  = 'ThorWebViewSDK/ThorFramework.h'
    s.libraries     = 'z' #表示依赖的系统类库，比如libz.dylib等(iOS lib库省略lib前缀)
    s.resource_bundle = {
      'ThorFramework' => ['ThorWebViewSDK/Resources/*.png']
     }
    
    s.subspec 'MoxieSDK' do |moxie|
        moxie.public_header_files = 'ThorWebViewSDK/MoxieSDK/include/MoxieSDK/MoxieSDK.h'
        moxie.source_files = 'ThorWebViewSDK/MoxieSDK/**/*'
    end
    
    s.subspec 'ThorCategory' do |category|
        category.public_header_files = 'ThorWebViewSDK/ThorCategory/MarsCategory.h'
        category.source_files = 'ThorWebViewSDK/ThorCategory/MarsCategory.h'
        category.frameworks    = 'UIKit','Foundation'
        #三级
        category.subspec 'NSData' do |data|
            data.public_header_files = 'ThorWebViewSDK/ThorCategory/NSData/*.h'
            data.source_files = 'ThorWebViewSDK/ThorCategory/NSData/*.{h,m}'
        end
        category.subspec 'NSDictionary' do |dict|
            dict.public_header_files = 'ThorWebViewSDK/ThorCategory/NSDictionary/*.h'
            dict.source_files = 'ThorWebViewSDK/ThorCategory/NSDictionary/*.{h,m}'
        end
        category.subspec 'UIDevice' do |device|
            device.public_header_files = 'ThorWebViewSDK/ThorCategory/UIDevice/*.h'
            device.source_files = 'ThorWebViewSDK/ThorCategory/UIDevice/*.{h,m}'
        end
        category.subspec 'NSString' do |string|
            string.public_header_files = 'ThorWebViewSDK/ThorCategory/NSString/*.h'
            string.source_files = 'ThorWebViewSDK/ThorCategory/NSString/*.{h,m}'
            string.dependency 'ThorWebViewSDK/ThorCategory/NSData'
        end
        category.subspec 'NSURL' do |url|
            url.public_header_files = 'ThorWebViewSDK/ThorCategory/NSURL/*.h'
            url.source_files = 'ThorWebViewSDK/ThorCategory/NSURL/*.{h,m}'
        end
        category.subspec 'UIViewController' do |vc|
            vc.public_header_files = 'ThorWebViewSDK/ThorCategory/UIViewController/*.h'
            vc.source_files = 'ThorWebViewSDK/ThorCategory/UIViewController/*.{h,m}'
        end
        
    end
    
    s.subspec 'ThorManager' do |manager|
        manager.public_header_files = 'ThorWebViewSDK/ThorManager/MarsManager.h'
        manager.source_files = 'ThorWebViewSDK/ThorManager/MarsManager.h'
        manager.dependency 'ThorWebViewSDK/ThorCategory'
        manager.frameworks    = 'Contacts','ContactsUI','AddressBook','AddressBookUI','AVFoundation','CoreLocation' #表示依赖系统的框架
        #三级
        manager.subspec 'AddressBook' do |address|
            address.public_header_files = 'ThorWebViewSDK/ThorManager/AddressBook/*.h'
            address.source_files = 'ThorWebViewSDK/ThorManager/AddressBook/*.{h,m}'
        end
        manager.subspec 'Authorize' do |auth|
            auth.public_header_files = 'ThorWebViewSDK/ThorManager/Authorize/*.h'
            auth.source_files = 'ThorWebViewSDK/ThorManager/Authorize/*.{h,m}'
        end
        manager.subspec 'Emergency' do |em|
            em.public_header_files = 'ThorWebViewSDK/ThorManager/Emergency/*.h'
            em.source_files = 'ThorWebViewSDK/ThorManager/Emergency/*.{h,m}'
        end
        manager.subspec 'Location' do |loc|
            loc.public_header_files = 'ThorWebViewSDK/ThorManager/Location/*.h'
            loc.source_files = 'ThorWebViewSDK/ThorManager/Location/*.{h,m}'
            loc.dependency 'ThorWebViewSDK/ThorManager/Authorize'
        end
        manager.subspec 'BaseDevice' do |base|
            base.public_header_files = 'ThorWebViewSDK/ThorManager/BaseDevice/*.h'
            base.source_files = 'ThorWebViewSDK/ThorManager/BaseDevice/*.{h,m}'
            base.dependency 'ThorWebViewSDK/ThorManager/Location'
        end
    end
    
    s.subspec 'ThorConfig' do |config|
        config.public_header_files = 'ThorWebViewSDK/ThorConfig/*.h'
        config.source_files = 'ThorWebViewSDK/ThorConfig/*.{h,m}'
    end
    
    s.subspec 'ThorService' do |service|
        service.public_header_files = 'ThorWebViewSDK/ThorService/*.h'
        service.source_files = 'ThorWebViewSDK/ThorService/*.{h,m}'
    end
    
    s.subspec 'ThorWebView' do |view|
        view.public_header_files = 'ThorWebViewSDK/ThorWebView/ThorWebViewController.h'
        view.dependency 'ThorWebViewSDK/ThorCategory'
        view.dependency 'ThorWebViewSDK/ThorManager'
        view.dependency 'ThorWebViewSDK/ThorConfig'
        view.dependency 'ThorWebViewSDK/ThorService'
        view.dependency 'ThorWebViewSDK/MoxieSDK'
        view.source_files = 'ThorWebViewSDK/ThorWebView/*.{h,m}'
        
        view.vendored_libraries = 'ThorWebViewSDK/MoxieSDK/libMoxieSDK.a'
        #view.resource      = 'ThorWebViewSDK/*.{bundle}'
    end
    
    # s.resource_bundles = {
    #   'ThorWebViewSDK' => ['ThorWebViewSDK/Assets/*.png']
    # }
    
    # s.public_header_files = 'Pod/Classes/**/*.h'
    # s.frameworks = 'UIKit', 'MapKit'
    s.dependency 'AFNetworking'
    s.dependency 'YTKNetwork'
end
